using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;

namespace Sedna.Logging
{
    public class AuditLog : IInterceptor
    {

        #region Fields

        private static AuditLog auditLog = new AuditLog();

        #endregion

        #region Static Methods

        public static AuditLog Instance()
        {
            return auditLog;
        }

        #endregion

        #region IInterceptor Implementation

        public int[] FindDirty(object entity, object id, object[] currentState, object[] previousState, string[] propertyNames, NHibernate.Type.IType[] types)
        {
            return null;
        }

        public object Instantiate(Type type, object id)
        {
            return null;
        }

        public object IsUnsaved(object entity)
        {
            return null;
        }

        public void OnDelete(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types)
        {
            // do nothing
        }

        public bool OnFlushDirty(object entity, object id, object[] currentState, object[] previousState, string[] propertyNames, NHibernate.Type.IType[] types)
        {
            return false;
        }

        public bool OnLoad(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types)
        {
            return false;
        }

        public bool OnSave(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types)
        {
            return false;
        }

        public void PostFlush(System.Collections.ICollection entities)
        {
            // do nothing
        }

        public void PreFlush(System.Collections.ICollection entities)
        {
            // do nothing
        }

        #endregion
    }
}
